import request from '@/utils/request'

// 获取经纬度坐标
export function getDataList(query, form) {
  return request({
    url: '/system/user/userList',
    method: 'post',
    data: form,
    params: {
      pageSize: query.pageSize,
      pageNum: query.pageNum,
    }
  })
}

export function getInfo(query) {
  return request({
    url: '/system/user/info',
    method: 'get',
    params: {
      userId: query, // 将参数添加到请求中
    }
  })
}

export function getMoney(query) {
  return request({
    url: '/user/wallet/info',
    method: 'get',
    params: {
      userId: query, // 将参数添加到请求中
    }
  })
}

export function getAddress(query) {
  return request({
    url: '/user/address/info',
    method: 'get',
    params: {
      userId: query, // 将参数添加到请求中
    }
  })
}


export function getMerchantSearch(query, form) {
  return request({
    url: '/merchant/list',
    method: 'post',
    data: form,
    params: {
      pageSize: query.pageSize,
      pageNum: query.pageNum,
    }
  })
}

export function getShoppingCart(userId) {
  return request({
    url: 'shopping/cart/list',
    method: 'get',
    params: {
      userId: userId // 将参数添加到请求中
    }
  })
}
